/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: DuKe TeAm
 * License Type: Purchased
 */
package orm;

import java.util.List;
import org.hibernate.criterion.DetachedCriteria;
import org.orm.PersistentSession;
import org.orm.criteria.*;

public class BabyMonitorDetachedCriteria extends AbstractORMDetachedCriteria {
	public final IntegerExpression codSystem;
	public final TimestampExpression regLogin;
	public final TimestampExpression regLogout;
	
	public BabyMonitorDetachedCriteria() {
		super(orm.BabyMonitor.class, orm.BabyMonitorCriteria.class);
		codSystem = new IntegerExpression("codSystem", this.getDetachedCriteria());
		regLogin = new TimestampExpression("regLogin", this.getDetachedCriteria());
		regLogout = new TimestampExpression("regLogout", this.getDetachedCriteria());
	}
	
	public BabyMonitorDetachedCriteria(DetachedCriteria aDetachedCriteria) {
		super(aDetachedCriteria, orm.BabyMonitorCriteria.class);
		codSystem = new IntegerExpression("codSystem", this.getDetachedCriteria());
		regLogin = new TimestampExpression("regLogin", this.getDetachedCriteria());
		regLogout = new TimestampExpression("regLogout", this.getDetachedCriteria());
	}
	
	public UserDetachedCriteria createUserCodUserCriteria() {
		return new UserDetachedCriteria(createCriteria("userCodUser"));
	}
	
	public DoctorDetachedCriteria createDoctoridDoctorCriteria() {
		return new DoctorDetachedCriteria(createCriteria("doctoridDoctor"));
	}
	
	public DiagnoseDetachedCriteria createDiagnoseCriteria() {
		return new DiagnoseDetachedCriteria(createCriteria("diagnose"));
	}
	
	public QuestFormDetachedCriteria createQuestFormCriteria() {
		return new QuestFormDetachedCriteria(createCriteria("questForm"));
	}
	
	public BabyMonitor uniqueBabyMonitor(PersistentSession session) {
		return (BabyMonitor) super.createExecutableCriteria(session).uniqueResult();
	}
	
	public BabyMonitor[] listBabyMonitor(PersistentSession session) {
		List list = super.createExecutableCriteria(session).list();
		return (BabyMonitor[]) list.toArray(new BabyMonitor[list.size()]);
	}
}

